package com.yunji.app.common;

import com.yunji.common.base.BaseController;
import com.yunji.common.base.response.Response;
import com.yunji.common.base.response.ResponseHelper;
import com.yunji.common.constant.CacheCode;
import com.yunji.common.utils.bean.BeanUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Package com.yunji.web.common
 * FileName:	GateWayRestrictController.java
 * Copyright:	Copyright © 2024 云集互联 All Rights Reserved
 * Company:		云集互联
 * @version: 1.0
 * @since: JDK 1.8.0_202
 * Create at:   2024-04-28 17:21:02
 * Description:
 * 操作审核交互
 * Modification History:
 * Author					Date						Version			Description
 * --------------------------------------------------------------------------------
 * HuaAo				2024-04-28 17:21:02			1.0				1.0 Version
 */
@Api(tags = "移动端-操作审核")
@RestController
@RequestMapping("/gateway/audit")
public class GateWayRestrictController extends BaseController {
    @ApiOperation("小程序审核")
    @GetMapping("/operate")
    public Response<Boolean> operate() {
        Boolean result = redisCache.get(CacheCode.APP_AUDIT);
        return ResponseHelper.success(BeanUtils.isNotNull(result) ? result : false);
    }
}